﻿using System;
using System.Net;

namespace Sonce.Service
{
	public class SonceService : ServiceBase
	{
		#region Compile
		public void CompileAsync(string code, string arg)
		{
			base.Request(code, (result, exception) =>
			{
				//OnCompileCompleted();
			});
		}

		public event EventHandler<CompileEventArgs> CompileCompleted;
		protected virtual void OnCompileCompleted(CompileEventArgs args)
		{
			if (CompileCompleted != null)
			{
				CompileCompleted(this, args);
			}
		}
		#endregion

		#region ServiceBase members
		protected override Uri ServiceUri
		{
			get
			{
				return new Uri("http://localhost/spice/compile.php");
			}
		}
		#endregion
	}
}
